// plugins/hapi-swagger.js
const inert = require('@hapi/inert');
const vision = require('@hapi/vision');
const pack = require('package');
const hapiSwagger = require('hapi-swagger');

module.exports = [
    inert,
    vision,
    {
        plugin: hapiSwagger,
        options: {
        info: {
            title: '接口文档',
            version: pack.version,
        },
        // 定义接口以 tags 属性定义为分组
        grouping: 'tags',
        tags: [
            { name: 'tests', description: '测试相关' },
        ]
        }
    }
]